import {createStore } from 'vuex'


const store = createStore({
    state(){
        return {
            userInfo:{} // 用户信息
            // name:'',
            // age:'',
            // phone:''
        }
    },
    mutations:{
        updateUserInfo(state, userInfo){
            console.log('userInfo', userInfo);
            state.userInfo = userInfo
            // state.name = payload.name
        }
    }
})


export default store